<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>待审核</title>

    <link rel="shortcut icon" href="/resources/admin/img/buildCloud_logo.png" type="image/x-icon">


    <!--Basic Styles-->
    <link href="../../assets/css/bootstrap.min.css" rel="stylesheet"/>
    <link id="bootstrap-rtl-link" href="" rel="stylesheet"/>
    <link href="../../assets/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="../../assets/css/weather-icons.min.css" rel="stylesheet"/>

    <!--Beyond styles-->
    <link href="../../assets/css/beyond.min.css" rel="stylesheet" type="text/css"/>
    <link href="../../assets/css/demo.min.css" rel="stylesheet"/>
    <link href="../../assets/css/typicons.min.css" rel="stylesheet"/>
    <link href="../../assets/css/animate.min.css" rel="stylesheet"/>
    <link id="skin-link" href="" rel="stylesheet" type="text/css"/>

    <script src="../../assets/js/skins.min.js"></script>
</head>
<body>
<div class="well with-header">
    <div class="header bordered-blue" style="font-size: 15px">综合查询</div>
    <div class="row">
        <div class="col-lg-2 col-sm-2 col-xs-2">
            <div class="form-horizontal" role="form">
                <div class="form-group">
                    <label for="status" class="col-sm-3 control-label no-padding-right">状态</label>
                    <div class="col-sm-9">
                        <select class="form-control" id="status">
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-2 col-sm-2 col-xs-2">
            <div class="form-horizontal" role="form">
                <div class="form-group">
                    <label for="status1" class="col-sm-3 control-label no-padding-right">状态</label>
                    <div class="col-sm-9">
                        <select class="form-control" id="status1">
                        </select>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-2 col-sm-2 col-xs-2">
            <div class="form-horizontal" role="form">
                <div class="form-group">
                    <label for="status2" class="col-sm-3 control-label no-padding-right">状态</label>
                    <div class="col-sm-9">
                        <select class="form-control" id="status2">
                        </select>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-lg-2 col-sm-2 col-xs-2">
            <div class="form-horizontal" role="form">
                <div class="form-group">
                    <label for="date1" class="col-sm-3 control-label no-padding-right">起始时间</label>
                    <div class="col-sm-9">
                        <input type="email" class="form-control" id="date1" placeholder="起始时间">
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-2 col-sm-2 col-xs-2">
            <div class="form-horizontal" role="form">
                <div class="form-group">
                    <label for="date2" class="col-sm-3 control-label no-padding-right">结束时间</label>
                    <div class="col-sm-9">
                        <input type="email" class="form-control" id="date2" placeholder="结束时间">
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-2 col-sm-2 col-xs-2">
            <div class="form-horizontal" role="form">
                <div class="form-group">
                    <label for="conditionSearch" class="col-sm-3 control-label no-padding-right"></label>
                    <div class="col-sm-9">
                        <a id="conditionSearch" href="javascript:void(0);" class="btn btn-blue">查询</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--</div>-->
</div>
<div class="well with-header" style="margin-bottom: 0px; padding-bottom: 0px">
    <div class="header" style="font-size: 15px">数据列表</div>
    <div class="form-inline" role="form" style="margin-bottom: 5px">
        <div class="input-group">
            <input type="text" id="search" style="width: 250px" class="form-control" placeholder="搜素范围：用户名、帐号">
            <span class="input-group-btn" style="width: 0px">
            <button class="btn btn-blue" type="button"><i class="fa fa-search"></i>搜索</button>
        </span>
        </div>
        <div class="input-group">
            <a href="javascript:void(0);" class="btn btn-blue icon-only white" id="cs" title="新增">
                <i class="fa fa-plus"></i>
            </a>
            <a href="javascript:void(0);" class="btn btn-blue icon-only white" id="refresh" title="刷新">
                <i class="fa fa-refresh"></i>
            </a>
        </div>
    </div>
    <table id="pendingAuditPersonList"></table>
</div>
<!--Basic Scripts-->
<script src="../../assets/js/jquery.min.js"></script>
<script src="../../assets/js/bootstrap.min.js"></script>
<script src="../../assets/js/slimscroll/jquery.slimscroll.min.js"></script>

<!--Beyond Scripts-->
<script src="../../assets/js/beyond.min.js"></script>

<script type="text/javascript" src="../../resources/admin/js/common/data.js"></script>
<script type="text/javascript" src="../../resources/admin/js/common/columns.js"></script>
<script type="text/javascript" src="../../resources/admin/js/common/common.js"></script>
<script type="text/javascript" src="../../resources/admin/js/common/layer.js"></script>
<script type="text/javascript" src="../../resources/admin/js/common/table.js"></script>
<script type="text/javascript" src="../../resources/admin/js/common/combobox.js"></script>

<script type="text/javascript" src="../../resources/admin/extra/datepicker/WdatePicker.js"></script>

<script type="text/javascript">

    $("#date1").focus(function () {
        WdatePicker({
            skin: 'twoer',
            dateFmt: 'yyyy-MM',
            readOnly: true,
            isShowToday: false,
            onpicked: function () {
                var endDate = $('#date2').val();
                if (endDate) {
                    curEl.bootstrapTable("refresh");
                }
                $dp.$('date2').focus();
            }
        });
    });

    $("#date2").focus(function () {
        var me = $(this);
        WdatePicker({
            skin: 'twoer',
            dateFmt: 'yyyy-MM',
            readOnly: true,
            isShowToday: false,
            minDate: '#F{$dp.$D(\'date1\')}',
            onpicked: function () {
                curEl.bootstrapTable("refresh");
                // 手动失去焦点，便于再次选中
                me.blur();
            }
        });
    });

    var dataArr = new Array();
    var data = new Object();
    data["id"] = 0;
    data["name"] = "已处理";
    dataArr.push(data);

    data = new Object();
    data["id"] = 1;
    data["name"] = "未处理";
    dataArr.push(data);

    $('#status').combobox({
        id: "status",
        data: dataArr,
        valueField: 'id',
        textField: 'name',
        defaultText: '请选择',
        listeners: {
            change: function () {
                curEl.bootstrapTable("refresh");
            }
        }
    });
    $('#status1').combobox({
        id: "status",
        data: dataArr,
        valueField: 'id',
        textField: 'name',
        defaultText: '请选择',
        listeners: {
            change: function () {
                curEl.bootstrapTable("refresh");
            }
        }
    });
    $('#status2').combobox({
        id: "status",
        data: dataArr,
        valueField: 'id',
        textField: 'name',
        defaultText: '请选择',
        listeners: {
            change: function () {
                curEl.bootstrapTable("refresh");
            }
        }
    });

    var curEl = $("#pendingAuditPersonList");
    curEl.initTable({
        url: '../../resources/admin/data/cs.json',
        columns: pendingAuditPersonColumns(),
        isPagination: true,
        extraParams: {
            status: -1
        },
        extraParamsDom: {
            status: $("#status"),
            startDate: $("#date1"),
            endDate: $("#date2")
        },
        buttons: [{
            id: "mark",
            btnClass: "btn btn-default btn-xs purple",
            icon: "fa fa-edit",
            name: "标记标",
            handler: function (event) {
                var curTarget = curEl.bootstrapTable('getRowByUniqueId', $(event.currentTarget).attr("id"));
                console.log(curTarget);
            }
        }, {
            id: "mark1",
            btnClass: "btn btn-default btn-xs purple",
            icon: "fa fa-edit",
            hidden: true,
            name: "标记标记标记",
            handler: function (event) {
                var curTarget = curEl.bootstrapTable('getRowByUniqueId', $(event.currentTarget).attr("id"));
                console.log(curTarget);
            }
        }]
    });

    $("#cs").click(function () {
        $.showPage("", "修改密码", webRoot + "/template/common/password.html");
    });
</script>
</body>
</html>
